str1 = "hello world"
str2 = str1.strip('h')  
# 只会移除头部存在的'h'
print(str2)   # ello world

str3 = "!!hello world!!"
str4 = str3.strip('!')   
# 移除两头的'!'
print(str4)    # hello world